function [AvgAmplitude] = CalculateAverageAmplitude(Data, Window, Interval, StartIndex)

    EndIndex = StartIndex + Window/Interval;
    count = 0;
    sumAmplitude = 0;
    %fprintf('Length : %d \n', length(Data));
    %fprintf('StartIndex : %d EndIndex : %d', StartIndex, EndIndex); 
    for i = StartIndex : EndIndex
        sumAmplitude = sumAmplitude + Data(i);
        count = count + 1;
    end
    AvgAmplitude = sumAmplitude/count;

end